package org.dtrd.modules.shop.entity.bean;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.common.util.DateUtils;
import org.dtrd.config.pay.OrderUtil;
import org.dtrd.modules.doctor.entity.bean.DoctorInfo;
import org.dtrd.modules.doctor.entity.po.DtrdEntRdDoctor;
import org.dtrd.modules.shop.entity.po.DtrdEntRdPayRefundFlow;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiao
 * @since 2022-06-23
 */
@Getter
@Setter
@ApiModel(value = "列表信息", description = "")
public class PayRefundFlowListInfo {

    private Integer dataId;

    @ApiModelProperty("医生ID")
    private Integer flowDoctorId;

    @ApiModelProperty("收退款类型：1-收钱，2-退款")
    private Integer flowType;

    @ApiModelProperty("患者ID")
    private Integer flowPatientId;

    @ApiModelProperty("患者姓名")
    private String flowPatientName;

    @ApiModelProperty("患者手机号")
    private String flowPatientMobile;

    @ApiModelProperty("金额，单位：分")
    private Integer flowPrice;

    @ApiModelProperty("金额，单位：元")
    private String flowFormatPrice;

    @ApiModelProperty("渠道")
    private String flowChannel;

    @ApiModelProperty("退款原因")
    private String flowRefundReason;

    @ApiModelProperty("对应订单")
    private String flowOrderNo;

    @ApiModelProperty("血糖仪")
    private String flowGlucometer;

    @ApiModelProperty("创建时间")
    private String createTime;

    @ApiModelProperty("创建人")
    private String createDoctorName;

    public PayRefundFlowListInfo (DtrdEntRdPayRefundFlow po) {
        dataId = po.getDataId();
        flowDoctorId = po.getFlowDoctorId();
        flowType = po.getFlowType();
        flowPatientId = po.getFlowPatientId();
        flowPatientName = po.getFlowPatientName();
        flowPatientMobile = po.getFlowPatientMobile();
        flowPrice = po.getFlowPrice();
        flowFormatPrice = OrderUtil.changeF2Y((long)po.getFlowPrice());
        flowChannel = po.getFlowChannel();
        flowRefundReason = po.getFlowRefundReason();
        flowOrderNo = po.getFlowOrderNo();
        flowGlucometer = po.getFlowGlucometer();
        createTime = DateUtils.formatDate(po.getCreateTime(), DateUtils.date_sdf.get().toPattern());
        if (po.getFlowDoctorId() != null) {

        }
    }
}
